package com.bj58.mis.apm.server.core.service;

import java.util.List;
import java.util.stream.Collectors;

public interface CurdService<Model, ID> extends IService {
    void insert(Model model);
	void update(Model model);
	void delete(ID id);
	void delete(List<ID> ids);
	Model get(ID id);
	default List<Model> get(List<ID> idList){
		return idList.stream().map(id -> this.get(id)).collect(Collectors.toList());
	}
	List<Model> query(Object parameter);
}
